<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel app\models\TaokeOrderInfoSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Taoke Order Infos';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="taoke-order-info-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('Create Taoke Order Info', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    <p>特别提示<br/>
    商品类别 类型搜索<br/>
        ['hot' => '畅销榜', 'new' => '最新','bao' => '包邮','hai'=>'品牌','free'=>'免费']<br/>
        女装1   男装9   内衣 10   母婴2  化妆品 3   居家  4   鞋包配饰 5  美食 6  文体车品 7  数码家电8 <br/>
        比如搜索品牌分类输入  hai<br/>
        比如搜索女装分类输入  1<br/>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            '_id',
            // 'id',
            'goodsid',

             [
        'attribute' => 'pic',
        'format' => 'html',    
        'value' => function ($data) {
            return Html::img( $data['pic'],
                ['width' => '70px']);
        },
    ],

            'd_title',
            // 'd_title',


            // 'pic',
            // 'cid',
            [
    'attribute' => 'cid',
    'value' => function ($model) {
        return $model->getCid($model->cid);
    },
    ],

// ['hot' => '畅销榜', 'new' => '最新','bao' => '包邮','hai'=>'品牌','free'=>'免费']

                [
    'attribute' => 'opty',
    'value' => function ($model) {
       return $model->getOpty($model->opty);
    },
    ],

            // 'org_price',
            'price',
            // 'istmall',
            'sales_num',
            // 'dsr',
            // 'sellerid',
            'commission',
            'commission_jihua',
            'commission_queqiao',
            // 'jihua_link',
            // 'que_siteid',
            // 'jihua_shenhe',
            // 'introduce',
            // 'quan_id',
             'quan_price',
            // 'quan_time',
             'quan_surplus',
             'quan_receive',
            // 'quan_condition',
            // 'quan_m_link',
            // 'quan_link',
            'ts',
            // 'use_cnt',
            'sort',
            // 'status',
            // 'opty',

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
</div>
